Hard
Given a binary tree, return the postorder traversal of its nodes’ values.
Example:
1 | Input: [1,null,2,3] |
Follow up: Recursive solution is trivial, could you do it iteratively?
- Recursive
1 | class Solution: |
动手又动脑,才能有创造
Hard
Given a binary tree, return the postorder traversal of its nodes’ values.
Example:
1 | Input: [1,null,2,3] |
Follow up: Recursive solution is trivial, could you do it iteratively?
1 | class Solution: |